package li.nibble.twittertido;

import li.nibble.twittertido.model.DataBase;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

public class SplashScreen extends Activity {
	protected boolean _active = true;
	protected int _splashTime = 5000;

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.splash);

		// thread for displaying the SplashScreen
		Thread splashTread = new Thread() {
			@Override
			public void run() {
				if (!DataBase.registered(SplashScreen.this)) {
					// startActivity(new Intent(this, Tutorial_0.class)
					// .setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));
					DataBase.localLogin(SplashScreen.this, "username",
							"password", 0, "email");
				}
				finish();
				startActivity(new Intent(SplashScreen.this, Main.class));
			}
		};
		splashTread.start();
	}
}